<?php
//use Entities;
$r = new Entities\Recibo();
$r->setdataPagamento(new DateTime());
$r->setCancelado(0);
$em->persist($r);


$error = "0";
try {
	$em->flush();
} catch (Exception $e) {
	$error = $e->getMessage();
}

echo "<error>$error</error><idGerado>".$r->getId()."</idGerado><dataAbertura>".date("d/m/Y")."</dataAbertura>";